<extend name="Base:base" />
<block name="head"><import type="css" file="css/page/node" /></block>
<block name="title">{$title}</block>
<block name="content">
    <div id="wrap">
        <a href="{:U('Admin/Rbac/addNode')}" class="add-app">添加应用</a>
        <foreach name="nodes" item="app">
            <div class="app">
                <p>
                    <strong>{$app.title}</strong>
                    [<a href="{:U('Admin/Rbac/addNode',array('pid'=>$app['id'],'level'=>2))}">添加控制器</a>]
                    [<a href="{:U('Admin/Rbac/editNode',array('id'=>$app['id']))}">修改</a>]
                    [<a href="{:U('Admin/Rbac/deleteNode',array('id'=>$app['id']))}">删除</a>]
                </p>
                <foreach name="app.child" item="action">
                    <dl>
                        <dt>
                        <strong>{$action.title}</strong>
                        [<a href="{:U('Admin/Rbac/addNode',array('pid'=>$action['id'],'level'=>3))}">添加方法</a>]
                        [<a href="{:U('Admin/Rbac/editNode',array('id'=>$action['id'],'level'=>2))}">修改</a>]
                        [<a href="{:U('Admin/Rbac/deleteNode',array('id'=>$action['id']))}">删除</a>]
                        </dt>
                        <foreach name="action.child" item="method">
                            <dd>
                                <span>{$method.title}</span>
                                [<a href="{:U('Admin/Rbac/editNode',array('id'=>$method['id'],'level'=>3))}">修改</a>]
                                [<a href="{:U('Admin/Rbac/deleteNode',array('id'=>$method['id']))}">删除</a>]
                            </dd>
                        </foreach>
                    </dl>
                </foreach>
            </div>
        </foreach>
</block>
